package com.feng.domain.enums;

public enum AppHttpCodeEnum {
    // 成功
    SUCCESS(200,"操作成功"),
    // 登录
    NEED_LOGIN(401,"需要登录后操作"),
    NO_OPERATOR_AUTH(403,"无权限操作"),
    SYSTEM_ERROR(500,"出现错误"),
    USERNAME_EXIST(501,"用户名已存在"),
     PHONENUMBER_EXIST(502,"手机号已存在"), EMAIL_EXIST(503, "邮箱已存在"),
    REQUIRE_USERNAME(504, "必需填写用户名"),
    LOGIN_ERROR(505,"用户名或密码错误"),
    ContentNotNull(506,"评论内容不能为空"),
    FILETYPEERROR(507,"文件类型错误，请上传png文件"),
    USERNAME_NOT_NULL(508,"用户名不能为空"),
    NICKNAME_NOT_NULL(509,"昵称不能为空"),
    PASSWORD_NOT_NULL(510,"密码不能为空"),
    PHONE_NOT_NULL(511,"手机不能为空"),
    TAG_NOT_NULL(512,"标签不能为空"),
    TAG_IS_EXIT(513,"该标签已存在"),
    FILE_IS_ERROR(514,"文件上传失败"),
    CATEGORY_IS_EXIST(515,"该分类已存在"),
    CODE_EXPIRE(516,"验证码不能为空"),
    CODE_ERROR(517,"验证码错误"),
    FILE_ERROR(518,"上传头像失败"),
    USER_NOT(520,"用户不存在，请先注册"),
    PASSWORD_PHONENOTNULL(519,"手机号或密码不能为空"),
    CODE_EXPIRES(521,"验证码已过期"),
    USER_EXPIRES(519,"用户登录信息已过期，请重新登录!");
    int code;
    String msg;

    AppHttpCodeEnum(int code, String errorMessage){
        this.code = code;
        this.msg = errorMessage;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
